package examEU;

public class HotelInfinito {
	private int noches;

	public HotelInfinito(int noches) {
		this.noches = noches;
	}

	public int numHuespedes() {

		int acc = 0;
		int vueltas = 0;

		int clientes = 0;

		for (int i = 1; i <= noches; i++) {
			if (acc == vueltas) {
				clientes++;
				acc++;
				vueltas = 0;
			}
			vueltas++;
		}

		return clientes;
	}
}